package com.itheima.reggie;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author gakki
 * @create 2022/4/30 11:50
 */
@Slf4j
@SpringBootApplication
/**
 * 使用@ServletComponentScan注解后，Servlet、Filter、Listener
 * 可以直接通过@WebServlet、@WebFilter、@WebListener注解自动注册
 */
@ServletComponentScan
@EnableTransactionManagement
/**
 * 开启缓存注解
 */
@EnableCaching
public class ReggieApplication {

   /* @Override
    protected void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/backend/**").addResourceLocations("classpath:/backend/");
    }*/

    public static void main(String[] args) {
        SpringApplication.run(ReggieApplication.class,args);
        log.info("项目启动!");
    }
}
